package invoicesystem.service.impl;

import invoicesystem.dao.BaseDataDao;
import invoicesystem.dao.impl.BaseDataDaoImpl;
import invoicesystem.entry.BaseData;
import invoicesystem.service.BaseDataService;

import java.util.ArrayList;

public class BaseDataServiceImpl implements BaseDataService {
     private BaseDataDao baseDataDao=new BaseDataDaoImpl();
    @Override
    public boolean updateBaseData(BaseData baseData) {
       return   baseDataDao.updateBaseData(baseData);
    }

    @Override
    public BaseData selectBaseData(Integer enterprise_id) {
        ArrayList<BaseData> list = baseDataDao.selectBaseData(enterprise_id);
        return list.get(0);
    }

    @Override
    public ArrayList<BaseData> getAll(Integer enterprise_id) {
        return baseDataDao.selectBaseData(enterprise_id);
    }

    @Override
    public BaseData selectById(int enterprise_id) {
        return baseDataDao.selectById(enterprise_id);
    }


}
